bootstrap: disarm tests that requires git context
authorFabian Grünbichler <git@fabian.gruenbichler.email>
Wed, 3 Sep 2025 12:45:32 +0000 (14:45 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Sun, 8 Mar 2026 10:11:47 +0000 (11:11 +0100)
Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email>
Gbp-Pq: Topic build
Gbp-Pq: Name bootstrap-disarm-llvm-config-test-that-requires-git.patch

src/bootstrap/src/core/builder/tests.rs
src/bootstrap/src/core/config/tests.rs
src/bootstrap/src/utils/helpers/tests.rs

index e0eb38d04aad0e608f9c5264c3f3b742bb0b6cca..c6f0748d05b0417da96cbecdd0431aa905a9cdeb 100644 (file)
@@ -430,6 +430,9 @@ fn test_prebuilt_llvm_config_path_resolution() {
         .join(exe("llvm-config", builder.config.host_target));
     assert_eq!(expected, actual);
 
+    // Debian: if-unchanged fails for non-git sources
+    return;
+
     let config = configure(
         r#"
             [llvm]
index e19604d4ab12f31af227255348ba730cd6c0a038..0bca66ff4c9c3573f9876cfa50d0401a69de809c 100644 (file)
@@ -37,6 +37,8 @@ fn download_ci_llvm() {
     let config = TestCtx::new().config("check").create_config();
     assert!(!config.llvm_from_ci);
 
+    // Debian: if-unchanged doesn't work in non-git context
+    return;
     // this doesn't make sense, as we are overriding it later.
     let if_unchanged_config = TestCtx::new()
         .config("check")
@@ -422,6 +424,7 @@ fn check_rustc_if_unchanged_paths() {
         .collect();
 
     for p in normalised_allowed_paths {
+        if p == "triagebot.toml" { continue };
         assert!(config.src.join(p).exists(), "{p} doesn't exist.");
     }
 }
@@ -490,6 +493,8 @@ fn test_exclude() {
 
 #[test]
 fn test_ci_flag() {
+    // Debian: if-unchanged doesn't work in non-git context
+    return;
     let config = TestCtx::new().config("check").arg("--ci").arg("false").create_config();
     assert!(!config.is_running_on_ci);
 
index 676fe6cbd5fe59cb990404fd5609de64b459cad6..a463fe136fca3cea0f906ba384cab87e3c70ec35 100644 (file)
@@ -101,6 +101,8 @@ fn test_set_file_times_sanity_check() {
 
 #[test]
 fn test_submodule_path_of() {
+    // Debian: doesn't work in non-git context
+    return;
     let config = TestCtx::new().config("build").create_config();
 
     let build = crate::Build::new(config.clone());